﻿#include "RenderDevice.h"

namespace DYEngine
{
	std::list<Renderer*> RenderDevice::mRenderers;

	void RenderDevice::AddRenderer(Renderer* const& pRenderer)
	{
		mRenderers.push_back(pRenderer);
	}

	void RenderDevice::RemoveRenderer(Renderer* const& pRenderer)
	{
		mRenderers.remove(pRenderer);
	}

	void RenderDevice::Draw()
	{
		for (auto iter = mRenderers.begin(); iter != mRenderers.end(); iter++)
		{
			(*iter)->Draw();
		}
	}
}
